home *** CD-ROM | disk | FTP | other *** search
/ Trusted Irix /B 4.0.4 / Trusted-Irix B-4.0.1.iso / dist / eoe1.idb / usr / include / sys / fs / pipe_inode.h.z / pipe_inode.h
C/C++ Source or Header  |  1992-04-03  |  1KB  |  50 lines

  1. /*
  2.  * Definitions for "pipe" filesystem.
  3.  *
  4.  * $Source: /src_trees/calypso/att/usr/src/uts/mips/sys/fs/RCS/pipe_inode.h,v $
  5.  * $Date: 89/11/28 14:38:48 $
  6.  * $Revision: 3.6 $
  7.  */
  8. #include "sys/fs/com_inode.h"
  9. #include "sys/poll.h"
  10. #include "sys/sema.h"
  11.  
  12. /*
  13.  * Common inode information for named pipes under the efs.  The
  14.  * implementation for pipes and fifos is shared by all the disk
  15.  * file systems (EFS and S5).
  16.  */
  17. struct pipe_inode {
  18.     struct    com_inode pi_com;
  19.     ushort    pi_flags;    /* state flags */
  20.     short    pi_frptr;    /* read pointer */
  21.     short    pi_fwptr;    /* write pointer */
  22.     sema_t    pi_frcnt;    /* number of readers count */
  23.     sema_t    pi_fwcnt;    /* number of writers count */
  24.     sema_t    pi_empty;    /* counting sema for waiting cause empty */
  25.     sema_t    pi_full;    /* counting sema for waiting cause full */
  26.     struct    pollqueue pi_rpq; /* poll/select process queues */
  27.     struct    pollqueue pi_wpq;
  28.     caddr_t    pi_bp;        /* buffer holding data */
  29. };
  30.  
  31. #define    pipe_fsptr(ip)    ((struct pipe_inode *) (ip)->i_fsptr)
  32.  
  33. #define    PIPE_SIZE    10240
  34. #define    PIPE_MAGIC    0xF1F0F1F0
  35.  
  36. /*
  37.  * Pipe flags.
  38.  */
  39. #define    PIPE_WCLOSED    0x0001    /* last writer has closed */
  40.  
  41. #ifdef _KERNEL
  42. /*
  43.  * Filesystem switch functions (should be void).
  44.  */
  45. extern    pipe_openi();
  46. extern    pipe_closei();
  47. extern    pipe_readi();
  48. extern    pipe_writei();
  49. #endif
  50.